{{extend 'layout.html'}}
<select id="difficulty" style="float:right; margin-right:10px;">
  <option value="all">{{=T("All difficulties")}}</option>
  {{for i in range(1,7):}}
  {{if (str(i) == arg):}}<option value="{{=i}}" SELECTED>{{=T("Difficulty")}} {{=i}}</option>
  {{else:}}<option value="{{=i}}">{{=T("Difficulty")}} {{=i}}</option>{{pass}}
  {{pass}}
</select>
<select id="user_id" style="float:right; margin-right:15px;">
  <option value="ALL">{{=T("All users")}}</option>
  {{for user in users:}}
  {{if str(user.id)==request.args(0):}}<option value="{{=user.id}}" SELECTED>{{=user.first_name}} {{=user.last_name}}</option>
  {{else:}}<option value="{{=user.id}}">{{=user.first_name}} {{=user.last_name}}</option>{{pass}}
  {{pass}}
</select>
{{=H1(T("Regional Quiz"))}}
{{=p}}
<script>
$('#difficulty').change(function() {
	window.location = '{{=URL('admin', 'regional', args=request.args(0))}}/'+$(this).val();
});
$('#user_id').change(function() {
	window.location = '{{=URL('admin', 'regional')}}/'+$(this).val()+'/{{=(request.args(1) or 'all')}}';
});
</script>